#define  _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>

int main()
{
	long long n = 0;
	scanf("%lld",&n);
	char str[20] = { 0 };
	int i = 0;
	int k = 0;
	while (n)
	{
		if (k!= 0 &&k % 3 == 0)
		{
			str[i++] = ',';
		}
		str[i++] = n % 10 + '0';
		n /= 10;
		k++;
		
	}
	for (i--; i >= 0; i--)
	{
		printf("%c",str[i]);
	}

	return 0;
}